<template>
    <el-table :data="contentTableDom" style="width: 100%" border class="table-css">
      <el-table-column prop="processName" label="处理步骤" width="180" align="center"/>
      <el-table-column prop="completerFullname" label="任务所属部门名称" width="180" align="center"/>
      <el-table-column prop="opinion" label="审批意见" width="180" align="center"/>
      <el-table-column prop="startTime" label="任务开始时间" width="180" align="center"/>
      <el-table-column prop="taskName" label="任务执行状态名称" width="180" align="center"/>
      <el-table-column prop="completerId" label="任务当前执行人" width="180" align="center">
        <template #default="scope">
          {{userFunc(scope.row.completerId)}}
        </template>
      </el-table-column>
      <el-table-column prop="approvalResult" label="任务审批结果" width="180" align="center">
        <template #default="scope">
          {{resultFunc(scope.row)}}
        </template>
      </el-table-column>
    </el-table>
  </template>
  <script setup lang="ts">
//   import { queryHisBpmOpinion } from '@/api/modules/gzl'
// import { getAllDept, getAllUser, queryAllByGroupId, queryUserOpenWin } from '@/api/modules/common'

//   import {onMounted, ref,toRaw} from 'vue'
//   import { useRoute } from 'vue-router'
//   import { useUserStore } from "@/stores/user";
//   const userStore = useUserStore();// 获取用户信息
//   const { loginName,userCname} = toRaw(userStore.userInfo)
//   const userInfo = ref([])
//   const route = useRoute()

//   onMounted(async()=>{
//     getFollowingInfo()
//     setUserOptions()
//   })
//   //获取用户
//   const setUserOptions = async() => {
//     const { success, data } = await getAllUser()
//     if (success) {
//       console.log(data,'data')
//       userInfo.value = data
//     }
//   }
//   //转化成真实名字
//   const userFunc = (val) =>{
//     for(let i of userInfo.value){
//       if(val == i.loginName){
//         return i.userCName
//       }
//     }

//   }
//   const resultFunc = (row) =>{
//     if(toRaw(row).approvalResult === '1'){
//       return '同意'
//     }else if(toRaw(row).approvalResult === '0'){
//       return '驳回'
//     }else {
//       return '--'
//     }
//   }
//   const contentTableDom = ref([])
//   const getFollowingInfo = async() => {
//       let par = {
//         bpmUser: {
//             userId: loginName,
//             userName: userCname
//         },
//         // limit: 0,
//         // offset: 0,
//         processDefinitionKey: "",
//         processInstanceId: route.query.activeKey,
//         taskStatus: "open",
        
//       }
//     let {data} = await queryHisBpmOpinion(par)
//     contentTableDom.value = data
//   }
  </script>
  <style lang="less" scoped>
  .table-css{
    padding:20px;
  }
  </style>
  